<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>CSS属性扩展-margin塌陷-同级</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        div{
            width: 200px;
            height: 200px;
            margin: 50px;
            background: blue;
        }
        p{
            width: 50px;
            height: 50px;
            background-color: pink;
            margin-top: 50px;
        }
    </style>
</head>
<body>
    <div>
        <p></p>
    </div>
    <div></div>
</body>
</html>